Fixed error of $_SESSION not existing when run in CLI.