Added exists method to documents manager.
Added tests for exists.