Well, the first thing I would do is strip out any '/' or '\' character so they can't access other directories. To do this, instead of directory storing the value of the $_GET array into $file, store the result of a [man]str_replace/man like so:
$file = str_replace( array('\\', '/'), NULL, $_GET['file'] );
Next, you can achieve what you're talking about doing by using a simple REGEXP syntax:
if(!preg_match('/\.(mov|jpg)$/i', $file))
die('ERROR: The extension on the file you requested is not allowed!');