Fix file browser tests by flushing $timeout