added get_random_pid/1 error handling
Merge pull request #179 from hamano/added_get_random_pid_error_handling

added get_random_pid/1 error handling