Finalized remote directory script, with links to filedetail.php