Added substr() to read last 3 characters of a $filename...

And guess if it is ‘text’ or ‘csv’. Created 2 methods in Filestore to
read() and write($array); both are public. Changed other functions to
private.