8024200: handle hg wrapper with space after #!

Reviewed-by: tbell
diff --git a/common/bin/hgforest.sh b/common/bin/hgforest.sh
index 12cf023..1dc50390 100644
--- a/common/bin/hgforest.sh
+++ b/common/bin/hgforest.sh
@@ -47,7 +47,7 @@
 bpython=""
 
 if [ "#!" = "$has_hash_bang" ] ; then
-   python="`head -n 1 ${whichhg} | cut -b 3-`"
+   python="`head -n 1 ${whichhg} | cut -b 3- | sed -e 's/^[ \t]*//;s/[ \t]*$//'`"
    bpython="`basename "$python"`"
 fi