use pidlockfile

This should fix #40.