Update test to work both locally and using Travis CI

Set NIDM_DIR both for local and online testing.