Implemented temporary file handling.

Fixed typos and other mistakes.
Suppress the error.
It's target, not the file.
Option to open something else than temp.