add fix for changing dict while iterate the same time
add dir checks with exceptions
Merge branch 'master' into ubuntu-precise

new upstream release 0.3.6
new changelog for upstream release 0.3.6