Fix directories being sent to download.php