Make directories as needed + removed package-metadata.json

If you try to move to file to a nonexistent path it is now created.

There still are some loopholes but I don't  think it is less safe than before.