added clearing of orphaned parent publish directories; added docstrings
initial start on unit tests for migration script