Use os.remove instead of shutil.rmtree if we try to remove a symbolic link

If we try to remove a symbolic link to a directory with shutil.rmtree, we get
the error “Cannot call rmtree on a symbolic link”
Merge pull request #6980 from jasongrout/nbextension-symlink

Use os.remove instead of shutil.rmtree if we try to remove a symbolic link