Current through a multilead nanojunction in response to an arbitrary time-dependent bias