Should ensure directory exists when trying to create files