Error checking for log path

Added error checking for the user defined variable logPath. If the
specified path doesn't exist, the script will create it.