minor perror behavior fix patch by nsz
eliminate dependence of perror on printf
initial check-in, version 0.5.0