explode-path requires that a path be normalized, i.e. symbolic links resolved and not a relative path. You can use normalize-path to get a normalized path:
500 Can't connect to 127.0.0.1:8778 (connect: Connection refused)
-- GordonWeakliem - 30 Apr 2004