Make sure to create parent directories as well