Converted BufferGuard into template
* Modified File class accordingly
* Modified MMap class to use the BufferGuard template