Fix for issue #20--forever unable to open log file

My first pull request! so let me know if I'm making a terrible hash of it. No pun intended.