Fix copy plugins

Added test for #2596. The solution proposed by @yakky works.

This is my first pull request with test (and my first fronted test ever), if you find some strange things please tell me I'll try to explain, and maybe fix them.

/cc @digi604 @FinalAngel

PS. thanks to @ojii for supporting me on IRC.