Pass linting and fix -C

Fix all ShellCheck warnings. Resolves #23 
Revert removal of color variable check for grep color option so -C works as advertised