A fix and a test case for gh-225 "Conventional logging"

If there is no pipe in the logger path, dont' assume
it's a process to fork, rather, assume it's a file.
Open the file in append mode and set up a signal handler
for log rotation.

Add log.rotate() function, doing the same as the signal handler,
useful when one uses a built-in logger.
The function does nothing if the logger is a pipe.

Fixes gh-225