Fix copying of static files

/to @bajtos 

This patch fixes file copying for `addComponent()`.

This test does not assert anything, it should be removed IMO.