replace data directory with tmp directory for heroku compatibility