Fixed the following problems in the perror function:
- putc is not declared -> replaced by fputc
- puts was used to output the user message which automatically
  introduced an unwanted newline between user message and error
  description -> replaced by fputs which does not add the newline

Signed-off-by: Michael Riss <Michael.Riss@gmx.de>
added missing test case

must have gotten lost in the rebasing operation ...
Merge pull request #883 from MichaelRiss/perrorFix

Perror formatting fix