Update remotes.py

Update NamedTemporaryFile() to use a defined directory for temp files. This is to resolve tracker bug 9530.