Change escapeshellcmd by escapeshellarg to accept # directory (refs #2786)