Added -d command line option to specify directory in which the AIs are stored.