Make directories as needed + removed package-metadata.json

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