fixed paths by removing dot-slashes
fixed paths by removing dot-slashes and by using fullfile rather than hard coding path separators that are platform dependent
corrected the caclulation of keepframes