Here's a quick and dirty replacement of this function in case you need to deal with special characters.
<?php
/**
* An ugly, non-ASCII-character safe replacement of escapeshellarg().
*/
function escapeshellarg_special($file) {
return "'" . str_replace("'", "'\"'\"'", $file) . "'";
}
?>