Added simple test case for perror.