Typo and import fixes in bedwig.js

@dasmoth

Fixes typos in `bedwig.js` that were introduced by https://github.com/dasmoth/dalliance/pull/80. My apologies for testing the `bed` file uploads more carefully.

There also seems to be some missing imports that threw an exception. Not sure if I'm missing something here, since you seem to have no problems with uploading a bed file [here] (https://github.com/dasmoth/dalliance/issues/58#issuecomment-52990064).