fixed path parser to understand nested path structure, instead of assuming a file structure only one layer deep