Baobab Fixes and Additional Specs

Hey @caitp —if you have a chance, I'd love for you to look over these commits. The first three are minor fixes we've made for Baobab and additional specs that cover those changes. The last one is a larger refactor that removes a lot of duplicate logic from the constructors of the individual classes and adds a dozen or so tests for the logic in the base class constructor. Since I haven't written many JS tests, it'd be great to get your feedback before I write more!

Sorry these are consolidated into a single PR — I suppose I should have filed an issue and PR for each one but things have been all over the place today.
is `resourcePath()` going to do the right thing here? If so, then it's alright --- make sure there's a test case verifying this though. I keep meaning to add test coverage reporting for inbox.js, but I'm a bit tied up over the next few weeks due to some presentations I'm giving in, so it's taking up a lot of my energy lately