change tempfiles creation to add the correct extension

We now create a temporary directory which contains the .s and .o
files. The original filename is kept. This allows us to work
more easily with other compilers than gcc.