added support for cmdline option log_dir

useful when running/testing as normal user.

btw, this is my 1st pull ever, so if I do something stupid plz let me know