Make outtmplfn in RESTFileMetadata optional and give it a default value. Fixes #4574.

You mean 'outtmplfn', right?

Further, I'm pretty sure that outtmplfn is always in locals, it just might be None.