Fatal crash on import fixed

The application will now just read the file before trying to write the
file. This means that you select the file that is in the algorithms
folder, it will still work. Also disabled import while an algorithm is
running and NULL-ed the value of the selected algorithm on a refresh,
since that element does no longer exists.