Attempt to create dir before creating files

This does not run as sudo, so you cannot create files in directories
that your remote_user does not have permission to modify.

Fixes #114.