[cmake,bugfix] Allow usage of empty CMAKE_MODULE_PATH.

At least for dune-common the CMAKE_MODULE_PATH may be empty
and removing an item from an empty list is an error. This
patch fixes this issue by checking whether th list is empty.