add Pathname.write_binary
add helpers for formula tests
use test helpers