make nose write coverage file to tmpdir, refs #125
add timeout to postgres connection, refs #127

and fixes potential unicode error found during testing