.htaccess fixes
1.9 docs are also stored in /api-data, not under /api,
and other fixes
Avoid "dir is undefined" error on page load.
Can't attach widgets to document.body until dojo/domReady! event.
Also, avoid creating helpDialog as a global variable.