Use first argument to script when not running in daemon mode. Fixes #1023.