Git add link related to JSON
Rewrite logic around shebang to make it more generic and testable

Also take this chance to add support for other shells.