Fix Memoizer.getMemoFile(id) when directory is the root path

This PR fixes the case where the memo file is targetted to be in the same folder as the original file, i.e. if the memo directory is initialized to either `/` on Unix or `C:\` on Windows. Previously `Memoizer.getMemoFile(id)` would fail with a `directory not writable` warning.
With these commits, this case is systematically tested and `getMemoFile(id)` should return a non-null path colocalizing with the files.

Memoizer tests are also added to test `getMemoFile(id)` for various input of `Memoizer.directory` and the `MemoizerTest` class is added to the `Formats BSD` test suite.
Might be worth a short comment here explaining the special case?