As I've said (Or maybe was not too clear about it, sorry), the destination file is created, but only with the following text (HTML): <html><body></body></html>
So there's no problem with the $dest path.
I've also double checked that $source holds the correct source path...