Check out Exporting a site, list, or document library using Windows PowerShell : BoostSolutions.
In a nutshell, the Powershell command is:
Export-SPWeb http://yoursitename.com/site -itemurl "/DocumentLibraryName" -includeversions all -includeusersecurity -path c:\insertfolderhere\yourfile.cmp
Document libraries are generally located in the root directory of the site so you should be able to retrieve them as above. Make sure you use the -includeversions and -includeusersecurity flags; I have had issues with the Export-SPWeb function bringing everything in if I don't use them both.
That will create a bunch of .cmp files called (in this case) yourfile.cmp, yourfile1.cmp, and so on. Copy all of these over to your other farm and then run this command:
Import-SPWeb http://thenewsite.com/site -path c:\whereveryouputtheexportedfiles\yourfile.cmp -includeusersecurity
Note, once again, the includeusersecurity flag.