Fix bug in try/catch of SignalExceptions due to php (pdo in this case) converting our SignalException into a PDOException.
Clean up our internal sleep function.