use dirname in teardown
Signed-off-by: Matthew Boedicker <mboedicker@pivotallabs.com>