MDL-37774 Add unit test to illustrate the problem with the trailing slash

The patch introduces two new tests for moodle1_file_manager::migrate_directory().
The second test with the trailing slash reveals the trouble here.
The expected behaviour is that the method would deal with the trailing
slash.
MDL-37774 Make moodle1_file_manager::migrate_directory() support trailing slash in rootpath

As the $rootpath is concatenated with the $relpath, we would end with a
path like course_files//file.txt. Such a path is detected as not-valid
later and an error would be thrown.

So the patch makes sure that the trailing slash is cut off.
MDL-37774 Do not pass trailing slash if the method does not want it