Fix calls to as_perror() so that the errno system message will be printed.