Ghost folders in /Volumes
Yes - premature ejection can cause these ghosts. 

You would need to script a cleanup that uses df and diskutil list and ls /Volumes to remove the ghost entries. 

I typically do this by hand as it happens very infrequently to me.