Making sure last forward slash is removed from input path.