Checks for path existance and writes directory in hookTest setup()