Use temporary files to prevent IO race conditions.

Refer to #260.
fish config file location verified