Fixed permalink error when creating folders in the media-library.