Fixed: Issue #2551 Rename folder does not update jsTree completely

Fixed: Issue #2551 by taking into account the trailing slashes saved in the file entries full path which coused the replace() function not to replace anything