handle shebangs for rewrite and search too from cli

just a little shuffling from before