Fix running of unit and functional tests via travis