Add test for fileio needed by mspec for tagging.
Implemented basic file IO needed by mspec tagging.
Merge branch 'fileio'
Fix behaviour of gsub when the match is at the current position.