add --logfile option to tj3d and tj3webd

When used, log messages are saved to specified file instead of ./tj3d.log and ./tj3webd.log.