Added matplotlib as a requirement
fixed indentation problem
using rm.tree to remove tmp dir