Added automated shutdown and javadocs

added a new class to allow thread to automatically flush()
Amended checkfileExists() to ensure contacts.txt is present, both on
read and write
added javadocs for all methods and classes