Fixed bug which occurs when logging to a file is enabled.

Issuing the command 'set logfile /some/file' will crash the application
with a Segmentation Fault. The reason is that va_list is reused in
flag_vputf() even though it should not [1].
Copying the va_list solves the problem.
The bug must have been caught by other people too since there was
already commented out code there.

[1]
http://www.gnu.org/software/libc/manual/html_node/Variable-Arguments-Output.html
Merge pull request #7 from ogasser/fix_logging

Fixed bug which occurs when logging to a file is enabled.