Create method `getPid()` on Pidfile class