add fgetattr. closes #5