Move parseShebang to Utils, and add test for it