Allow use of destination parameter for modules and themes

Original patch by acbramley. I made the fork, applied the patch using attribution, and then worked on a test.

Original issue: http://drupal.org/node/2011284