First patch makes mode and createmode of atomictempfile() optional. Second patch add the ability to copy extra file attributes on Windows. Mostly it's for "hidden" flag. This will make it easy to utilize atomictempfile from extensions or tools like TortoiseHg.