Import improvements from dependent apps

* Dist into 'bin/' and 'lib/'.
* Ignore logs and pidfiles.