Tests and fix for issue #137.

Rectified pull request.
  I'm sorry for that problem with original pull request. That's kind of teething problem, the first pull request to GitHub from me.
  Indeed, for some reason GitHub windows client always marks whole files as modified when I do commit of my changes. However, on the stage of uncommitted changes the diff is correct. I've rolled back broken revision and repeated commit from command line without problems  this time (hopefully).

Cheers,
Tavriets