Merge pull request #130 from byxorna/will-replace-dash-in-shellscript-variables

add formatPosixKey function
make formatPosixKey behave better