Fix a bug about log rotation. yaws_logger:do_rotate/2 was buggy.