The replace of the '\' was only replacing the first one. Changed it to replace all '\'

I found that the sub-directories still contained the wrong slash.  The reason is that the replace used was only replacing the first slash.  Changed it to do a replace all with regex.

Also, updated tests.