When there's an error with the pathname in "command script import" lldb just says "error: module importing failed: invalid pathname" but doesn't actually tell you what the bad pathname was. When you're loading some python module that imports a bunch of other modules, that makes it hard to figure out which one was bad.
I changed it to either say "empty path" if that was the error, or report the pathname otherwise. I added a test as well.
Is this testable? Maybe not because the top level command always wants some string, unless "" is accepted.