Update prepare.sh

* Fixes for Fedora
* Update submodules check