Added purge($directory) method.

Signed-off-by: Jan Pecha <janpecha@email.cz>