fixed upload and media directory paths