Fixing it to append a trailing slash in end
Testing abspath instead of normpath
Appending trailing slash if not present
Making note in docs and changing example
Removing trailing whitespace
Change the error message to show actually what's tested
Backport #14488 to 2014.7