Automatic test terrain generation  if no Test Database

Made test terrain generation automatic if no Test DB in CWD. Also added
TESTShelf to the .gitignore