t1301: move modebits() to test-lib-functions.sh