Fix path.basename bug: it leaves a trailing slash
Create Builder#build

- And move the build caching logic from jQueryUI into Builder (where it
  belongs);