issue #1157 - remove uses of GetDirectory and replace with GetPath