Documents within Google Apps are not particularly in a folder. We can think of folder more as labels, even though the engineers have made stride to make it look like the paradigm we are used too. So files can exist in multiple folders and creation happens in the root folder, after which you can add them to many folders as you want, and as you rightly do remove them from the root folder.
I would suggest you start using the Drive Services instead of DocList. DocList was created before Google Drive and while it continues to work, and no deprecation has been announced, it would be safer to move to Drive which offers a larger and more comprehensive API. (DocList is still labeled as experimental, while Drive is not)