How to pack all linked data inside the current .blend file
There is now an add-on (BlendFile Utils) that comes with Blender (2.77 and newer).

That supports packing a file and all its dependencies into an archive.



Note that this is a stand-alone tool which can be run from the command line, the same code used on the Blender-Cloud for downloading blend's as zipfiles and was used for exporting Blend files to the renderfarm for the short film Cosmos Laundromat.