add test file

make executable

add shebang and correct input checking