Used PDO prepare statements
Change instructions
Lots of changes, including abstracting path splitting and more logging, also added facility to specify which collection to upload