fixed issue regarding paths with trailing separator