Correcting relative file paths for data in subdirectories