deploying a directory structure to new path

I am using bower packaging system to fetch files to local project however breaking conventions these files are useless on their own. They need to be injected in the proper location in the MVC framework I'm using so whatever bower fetches I need to essentially do a post action and copy the directory structure / files from components/myexample/ to application/

remote bower package:

controllers
   mycontroller.php
models
   mymodel.php
view
  layout
     myview.php
composer.json

local project:

composer.json
components
  myexample
      controllers
        mycontroller.php
      models
       mymodel.php
      view
       layout
         myview.php

application
   controllers
   models
   view

I was thinking of upon retrieving the directory structure and files to zip it all and then do an extract to the right directory. I need the solution to be cross platform compatible. How would you do it and better yet how else would you implement this?