# Functions
CreateTempWithContents - create a temp file with the filename pattern and contents specified.
FileExists checks if a file exists and is not a directory before we try using it to prevent further errors.
FileOrDirectoryExists - check if specified filename (which is a file or directory) exists.
IsDirectory - check if specified filename is a directory.
ReadFile - read the contents of a file and optionally trim any whitespace.
ReadFileAsString - read the contents of a file and optionally trim any whitespace.