Port startup checks

The following functions have been ported:
* check_mutex
* get_file_path
* check_files_integrity
* check_file_paths
* check_file_path

The check for files on CD-ROM has not been implemented yet. (The original implementation seems to break anyway when called from startup_checks, maybe some initialization is missing from elsewhere.)