Fix gcc warnings; fix open_logfile()

51361e4 Get rid of false positive gcc warnings
bfd8504 Fix and consolidate option -e, -l, and -w