Fixed bugs in memory leaks in native side

There was a memory leak in casting long valued pointers into jlong data
types.
Added new test for BufferedImages tests
Removed all absolute paths of teed pdfs and images. Added tessdata
folder into the project. Now project runs without any external resource.