fix permissions/auto create dir