Use pushd and popd to move between ffmpeg and zoneminder