Refactor to remove intermediate function, now all fns take a base-url. Added stubs for exists? and dir?