Possible bug in API with create/modify domains and home directory

I found a bug in one of the Virtualmin APIs. In modify-domain.pl, when specifying a new home directory via the --home option, if the directory does not exist it throws an error saying:
"New home directory already exists"

When in fact, the directory doesn't exist and I want to create it. If I do create it first, and then choose that directory as the home directory, it does work, but then creates a new directory of the same name inside of it. For example, if I create /propable/devtest and specify that as the home directory, it creates /propable/devtest/devtest and makes that the home directory.

Closed (fixed)