In order to import the job, the dependency job must exist before the job with the dependency is imported. This requirement is to ensure that no broken references are created. With that said, your script will have to go out and find the dependency job, export it to XML, then export the job that depends on it. The import process must then start in the reverse order. Import the dependency jobs, then import the jobs with that dependency. This would also be the same for any other references that would exist, such as batch queues, JAMS users, and setup jobs, for example.