Url encoding paths, gallery template now opens files