keep changes to prefixes local, #4
Do not look for prefixes if there are no sub-directories, #7
Use different error message to ease narrowing down problems, #7