Fix a bug i introduced a while back with pidfiles.