buffile: add testcase, fopen constructor also as method