Don't assume path ends with the proper delimiter (fixes #19)