Fixed subfolder handling

gh-478