Refactor temporary file access

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Remove variable with misleading name

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Flush temporary file used by prowizard

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Cleanup: make ugly preprocessed file more readable

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Removed unused open file descriptor function

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>