Added appendToFile method

Allows you to easily append some text to a file,
useful for text logging.