Make thumb.php respond with HTTP 400 (not 500) on invalid parameters