Per a suggestion of JMarc's, first write the saved file to a
temporary name, then move it to its real location if we succeed.
This prevents our over-writing the existing file with a corrupt
one.
* sk.po
Flush stream more often to help figure out where the mystery crash
originates.
Use a different naming scheme, per Enrico's suggestion.
Detect binary EPS files correctly (bug #9146)

The Adobe EPS file format specification (TN-5002, currently available at
http://partners.adobe.com/public/developer/en/ps/5002.EPSF_Spec.pdf) specifies
a binary version of EPS files with integrated preview, sometimes also called
DOS EPS binary files. LyX 2.0 did recognize these files unreliably by
extension, but since f4eae12d they are misdetected as latex (bug #9146).
This change adds proper detection for these files using the officially
documented binary header.
Fix a regression reported at #9146

This regression was introduced by me at 8b66f9ce. I did not take
into account that a call to a python script containing $$s is embedded
within a separate python script. Thus, when commandPrep() is called it
only sees the call to the outer python script, and does not see the
$$s contained in that python script. It therefore did not substitute
for it. This fix simply calls commandPrep() directly before writing
the embedded command.