Revert "Remove redundant build writes"

This reverts commit 5a933ae8fffe1ef1ea349380976fc383515fecc4.

My mistake. This is what caused the libs to be written to pkg/lib.
This is needed for fine grained import of annotator from CommonJS
like browserify.