Change status.pid to use Python regular expressions

This allows us to avoid shell pipes and prevents shelling out to grep.