Write package json in output dir

Fixes #1