Fixes #1: creates parent folders for target file.