Properly escape the foldername to avoid XSS issues