Simplify export logic
Update has() function logic to cache test results
Syncing up with `export`.
`build.js`: Prefer `Buffer.concat` to `+=`.