Add extract() bash function.