fixed scan detector and added options to bash wrapper

there was a typo in my code on line 60 in scan detector which rendered
my graph file descriptor useless.

after finding that, fleshing out some ideas i had for my bash wrapper
was painless. :D