Test if the specified directory exists; exit with an error message if it does not.
Handle case where there is no useful data in .dat file.