Add shebang, change 0777 to 0o777 to fit into Python3