check for trailing slash in path argument