This allows the `theme:sync` command to properly sync to specified targets. Fixes #4887. Replaces #4935. Credit to @bennothommo for the initial implementation.