SHRINKRES-138 Replaced regex with plain replacement for OS dependent file operations