Fixed TypeError bug in is_running() with the newline character in PID files.