added nodialog option. added preliminary FreeBSD support