Valve provides an
API for grabbing the last matches and retrieve the final board (levels, K/D/A, creep stats, items). Unfortunately, there is actually no way for automatically dumping the replay through scripts (the required salt functionality has been removed), this has to be manually done with the game interface.
http://dev.dota2.com/showthread.php?t=58317