Merge pull request #16 from adam-vessey/7.x

Allow the use of dimensions passed down.
Fix JS errors due to bad indicies from core code.

"undefined" indicies get passed to
https://github.com/openlibrary/bookreader/blob/master/BookReader/BookReader.js#L1780-L1788
which results in NaN being used as an index...  Which in turn causes much fun.