This is NOT the best directory structure.
See the tutorial video 0.b slide 20 to 24 that give the directory structure.
In your case you should have
www.mydomain.com => /home/user/domains/mydomain.com/public_html
master.mydomain.com => /home/user/domains/mydomain.com/subdomains/master/public_html
slave.mydomain.com => /home/user/domains/mydomain.com/subdomains/slave/public_html
So that the domains and subdomain always have their own directory that is not a subdirectory of something else.
In addition, this allows you to have public and private directories.
If you are using cPanel, change the default values proposed by the Addon Domain and subdomains to ensure that you have a specific directory for each domain and subdomains.