Fixed issue with subdirectories and collections. Decided not to include collections, as it's still experimental.