Fix `path-replace-suffix' and `path-add-suffix' on a path for a different platform

See http://osdir.com/ml/general/2013-09/msg55673.html