fixes a bug regarding indexes, adds runtests.sh

There was a bug regarding the creation of the index of the Day model.
It also adds the script for running the tests regarding the application (excluding those from datastore).