Add error handling to move and copy cabal directory

To avoid error while deploying if a project has no .cabal directory.