Simplify debugging code by always writing trace files to the current directory

Previously they were mostly written to the current directory on windows but into /tmp/ on unix, leading to a lot of unnecessarily complicated string handling code for not much reason.