fix apache rewrite generation
Before this change the system wasn't able to handle nested directories properly.
A multidomain-setup using a different domain for every app and having them on the same file tree level was required for a valid output.
Now it's handling the "default"-case properly which might be one app at `/` and others in sub-directories.
Technical:
The algorithm didn't decide correctly if an app is placed in a sub-directory of another app. Now it's removing extra htaccess-files for those sub-directories and places everything correctly in the highest folder handling every app and the root-app at last.