fixed bug introduced a couple of commits ago (doing gl diff on a non-existent file crashed), and added a test so that it doesn't break again