Handle creation of logfile better

If /dev/null was set as the log file, /dev/ had wacky permissions
set on it and caused allsorts of hurt