diff --git a/debian/build_virtualenv b/debian/build_virtualenv
index 801ecb9086c6e416e960cd1cb06e521704484368..e006b4884913bb82b8055617407e69575c8dc0e9 100755
--- a/debian/build_virtualenv
+++ b/debian/build_virtualenv
@@ -57,7 +57,7 @@ case "$DEB_BUILD_OPTIONS" in
         # Copy tests to a temporary directory so that we can put them on the
         # PYTHONPATH without putting the uninstalled synapse on the pythonpath.
         tmpdir=`mktemp -d`
-        trap "rm -r $tmpdir" EXIT
+        trap 'rm -r $tmpdir' EXIT
 
         cp -r tests "$tmpdir"