Moving checkpids script to lib

Signed-off-by: Danny Price <dan@thetelegraphic.com>