Keep CJS and AMD output split in dist/.

Add `lib/` for ES6 output.