fix img attachment path for npm test

running npm test fails for cbl-document.js
becuase attachments in data dir cannot be found.
using __dirname to fix this