Index: humanfriendly/testing.py
--- humanfriendly/testing.py.orig
+++ humanfriendly/testing.py
@@ -25,7 +25,7 @@ its much better error reporting) but I've yet to publi
 import functools
 import logging
 import os
-import pipes
+import shlex
 import shutil
 import sys
 import tempfile
@@ -521,7 +521,7 @@ class MockedProgram(CustomSearchPath):
         pathname = os.path.join(directory, self.program_name)
         with open(pathname, 'w') as handle:
             handle.write('#!/bin/sh\n')
-            handle.write('echo > %s\n' % pipes.quote(self.program_signal_file))
+            handle.write('echo > %s\n' % shlex.quote(self.program_signal_file))
             if self.program_script:
                 handle.write('%s\n' % self.program_script.strip())
             handle.write('exit %i\n' % self.program_returncode)
