Added a chekc/create directory function to keep it all tidy.