(#506) - putAttachment don't respect rev parameter

One might be able to put an attachment with an old rev or even without any rev.

This PR comes with a test and the fix.