fix NullPointerException in Document.getRevision()

If you try to get a specific revision using Document.getRevision, but
the current revision has never been retrieved (and so currentRevision is
null), a NullPointerException is thrown.
Merge pull request #25 from mjq/doc_rev_npe

Fix NullPointerException in Document.getRevision()