Improved subdirectory handling, fixed bug with asset copying