add execute_in_dir method

Signed-off-by: Sebastien Varrette <sebastien.varrette@uni.lu>