tfs_openFile and tfs_closeFile

Did them correctly this time.  code is pretty well commented let me know
if you have questions.