introducing nb space check

@jish

(also changed test_filename to behave more like what staged_files would return)