fixed Darwin mapping and added unit test; also added .idea to .gitignore...

... along the way and fixed a few warnings. fixes zeromq/jzmq #360.