Organised directories and autocreation

Directories are now defined in the scripts they are for. A new function
DirectoryCheck is used to automatically create a directory if it doesn't
exist. These checks have also been removed from the main script and
added to their respective scripts.