Fixed Media_template::getCategories() bug for non-existent media
Fixed folder path auto-generation trailing slash bug