Ensure digestified file's target directory exists

Prevents an error when a module lives in a subdirectory.