anchor.diff:  
   # Check argument(s)
   if [ -z "$1" ]; then
  -    echo "Small script to stitch video panorama files."
  +    echo "Small script to stitch panoramic videos."
       echo -e "Script originally writen for Samsung Gear 360.\n"
       echo -e "Usage:\n$0 inputdir [outputfile]\n"
  -    echo "Where inputfile is a panorama file from camera,"
  +    echo "Where inputfile is a panoramic video file,"
       echo "output parameter is optional."
  +    run_command notify-send "Please provide an input file."
  +    sleep 2
       exit 1
   fi
   
   # Output name as second argument
   if [ -z "$2" ]; then
  -    OUTNAME=`basename "${1%.*}"`_pano.mp4
  +    # If invoked by nautilus open-with, we need to remember the proper directory in the outname
  +    OUTNAME=`dirname "$1"`/`basename "${1%.*}"`_pano.mp4
       echo "DEBUG: output filename: $OUTNAME"
   fi
   
  
positive.code: 
  :: Execute commands (as simple as it is)
  echo Converting video to images...
  "%FFMPEGPATH%/ffmpeg.exe" -i %1 -vf scale=7776:3888 %FRAMESTEMPDIR%/%IMAGETMPL%
  if %ERRORLEVEL% EQU 1 GOTO FFMPEGERROR
  
  :: Stitching
  
negative.code: ################################ Linux part here
  
  # http://stackoverflow.com/questions/59895/can-a-bash-script-tell-which-directory-it-is-stored-in
  DIR=$(dirname `which $0`)
  
  # Clean-up function
  clean_up() {
      echo "Removing temporary directories..."
      if [ -d "$FRAMESTMPDIR" ]; then
          rm -rf "$FRAMESTMPDIR"
      fi
      if [ -d "$OUTTEMPDIR" ]; then
          rm -rf "$OUTTEMPDIR"
      fi
  }
  
  # Function to check if a command fails
  # http://stackoverflow.com/questions/5195607/checking-bash-exit-status-of-several-commands-efficiently
  run_command() {
      "$@"
      local status=$?
      if [ $status -ne 0 ]; then
          echo "Error while running $1" >&2
          if [ $1 != "notify-send" ]; then 
             # Display error in a nice graphical popup if available
             run_command notify-send "Error while running $1"
          fi 
          clean_up
          exit 1
      fi
      return $status
  }
  
  # Do stuff to make this thing run on various POSIX operating systems
  # http://stackoverflow.com/questions/3466166/how-to-check-if-running-in-cygwin-mac-or-linux
  os_check() {
      case "$(uname -s)" in
  
      Darwin)
  