Fix shebang related bugs.