add output option to pkgenv

Using `pkgenv -o` or `pkgenv --output` will now cat the file instead of editing it.