Sort out the logging

Log WARNING messages and above to a rotating ~/.tvlog file, also log
CRITICAL messages to stderr, add options to log DEBUG messages to file
also and to change location of log file.