Resolved bugs reported in Issue 947. Also added SNAPSHOT suffix to the version by default.
Revised based on pull request feedback.