Not sure this is going to work in general.  (It does work for your test case?)  It seems to me the right fix is to make `as(<file-system-directory-locator>, <string>)` work by adding a method.