main: add -pidfile command line option