Maybe try changing it to escapeshellarg() but remove the single quotes around the argument.