Better handling of pid_path

This commit fixes #193