throw Exception in path services if no entity id is set

If no entity id is set a InvalidArgumentException is thrown. This is required, because the filename is generated by using the id.